﻿using ESRI.ArcGIS.ADF.BaseClasses;
using ESRI.ArcGIS.Controls;

namespace CSharpDotNETCommands
{
#pragma warning disable CS0618 // “BaseTool”已过时:“The assembly containing this class is obsolete.  Reference the ESRI.ArcGIS.ADF.Local assembly instead.”
    internal sealed class BurstPipeAnalysisTool : BaseTool
#pragma warning restore CS0618 // “BaseTool”已过时:“The assembly containing this class is obsolete.  Reference the ESRI.ArcGIS.ADF.Local assembly instead.”
    {
        // HookHelper对象处理通过OnCreate事件的回调 
        private readonly IHookHelper m_HookHelper = new HookHelperClass();

        public BurstPipeAnalysisTool()
        {
            // 获取程序集中的资源数组 
            string[] res = GetType().Assembly.GetManifestResourceNames();
            // 设置工具属性 
            base.m_bitmap = new System.Drawing.Bitmap(GetType().Assembly.GetManifestResourceStream(res[0]));
            base.m_caption = "爆管分析";
            base.m_category = "CustomCommands";
            base.m_message = "打开爆管分析工具";
            base.m_name = "CustomCommands_BurstPipeAnalysis";
            base.m_toolTip = "爆管分析";
        }

        public override void OnCreate(object hook)
        {
            m_HookHelper.Hook = hook;
        }


    }
}
